<%@ page contentType="text/html; charset=utf-8" language="java"
	import="java.sql.*" errorPage=""%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	font-size: 12px;
	font-weight: bold;
}

.STYLE4 {
	color: #03515d;
	font-size: 12px;
}
-->
</style>

		<script>
var highlightcolor = '#c1ebff';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var clickcolor = '#51b2f6';
function changeto() {
	source = event.srcElement;
	if (source.tagName == "TR" || source.tagName == "TABLE")
		return;
	while (source.tagName != "TD")
		source = source.parentElement;
	source = source.parentElement;
	cs = source.children;
	//alert(cs.length);
	if (cs[1].style.backgroundColor != highlightcolor && source.id != "nc"
			&& cs[1].style.backgroundColor != clickcolor)
		for (i = 0; i < cs.length; i++) {
			cs[i].style.backgroundColor = highlightcolor;
		}
}

function changeback() {
	if (event.fromElement.contains(event.toElement)
			|| source.contains(event.toElement) || source.id == "nc")
		return


if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>

<script type="text/javascript">
function submitForm() {
	document.forms["myform"].submit();
}

function deleteMultiple() {
	document.forms["form1"].submit();
}
</script>

		<script type="text/javascript">
// --列头全选框被单击---
function ChkAllClick(sonName, cbAllId) {
	var arrSon = document.getElementsByName(sonName);
	var cbAll = document.getElementById(cbAllId);
	var tempState = cbAll.checked;
	for (i = 0; i < arrSon.length; i++) {
		if (arrSon[i].checked != tempState)
			arrSon[i].click();
	}
}
// --子项复选框被单击---
function ChkSonClick(sonName, cbAllId) {
	var arrSon = document.getElementsByName(sonName);
	var cbAll = document.getElementById(cbAllId);
	for ( var i = 0; i < arrSon.length; i++) {
		if (!arrSon[i].checked) {
			cbAll.checked = false;
			return;
		}
	}
	cbAll.checked = true;
}
// --反选被单击---
function ChkOppClick(sonName) {
	var arrSon = document.getElementsByName(sonName);
	for (i = 0; i < arrSon.length; i++) {
		arrSon[i].click();
	}
}
</script>

	</head>

	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		 
			<tr>
				<td height="30" background="../tab/images/tab_05.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="30">
								<img src="../tab/images/tab_03.gif" width="12" height="30" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="46%" valign="middle">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="5%">
														<div align="center">
															<img src="../tab/images/tb.gif" width="16" height="16" />
														</div>
													</td>
													<td width="95%" class="STYLE1">
														<span class="STYLE3">你当前的位置</span>：[系统管理]-[险别管理]
													</td>
												</tr>
											</table>
										</td>
										<td width="54%">
											<table border="0" align="right" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="60">
														<table width="87%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td class="STYLE1">
																	<div align="center">
																		<input type="checkbox" name="chkAll" id="chkAll"
																			title="全选" onclick="ChkAllClick('chkSon','chkAll')" />
																	</div>
																</td>
																<td class="STYLE1">
																	<div align="center">
																		全选
																	</div>
																</td>
															</tr>
														</table>
													</td>
													<td width="60">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td class="STYLE1">
																	<div align="center">
																		<img src="../tab/images/22.gif" width="14" height="14" />
																	</div>
																</td>
																<td class="STYLE1">
																	<div align="center">
																		<a href="dept_add.jsp">新增</a>
																	</div>
																</td>
															</tr>
														</table>
													</td>
													<td width="60">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td class="STYLE1">
																	<div align="center">
																		<img src="../tab/images/33.gif" width="14" height="14" />
																	</div>
																</td>
																<td class="STYLE1">
																	<div align="center">
																		修改
																	</div>
																</td>
															</tr>
														</table>
													</td>
													<td width="52">
														<table width="88%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td class="STYLE1">
																	<div align="center">
																		<img src="../tab/images/11.gif" width="14" height="14" />
																	</div>
																</td>
																<td class="STYLE1">
																	<div align="center">
																		<a href="javascript:deleteMultiple();">删除</a>
																	</div>
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="../tab/images/tab_07.gif" width="16" height="30" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="8" background="../tab/images/tab_12.gif">&nbsp;
								
							</td>
							<td>
								<table width="100%" border="0" cellpadding="0" cellspacing="1"
									bgcolor="b5d6e6" onmouseover="changeto()"
									onmouseout="changeback()">
									<tr>
										<td width="12%" height="22" background="../tab/images/bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">

											</div>
										</td>
										<td width="11%" height="22" background="../tab/images/bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">序号</span>
											</div>
										</td>
										<td width="13%" height="22" background="../tab/images/bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">险别代码</span>
											</div>
										</td>
										<td width="27%" height="22" background="../tab/images/bg.gif"
											bgcolor="#FFFFFF">
											<div align="center">
												<span class="STYLE1">险别名称</span>
											</div>
										</td>
										<td width="17%" background="../tab/images/bg.gif"
											bgcolor="#FFFFFF"><div align="center"> <span class="STYLE1">所属产品</span> </div></td>
										<td width="20%" height="22" background="../tab/images/bg.gif"
											bgcolor="#FFFFFF" class="STYLE1">
											<div align="center">
												基本操作
											</div>
										</td>
									</tr>

									<form action="deleteMultipleDept" method="post" name="form1">
									
									<s:iterator value="#session.coverages" status="status" var="cvrg">

										<tr>
											<td height="20" bgcolor="#FFFFFF">
												<div align="center">
													<input type="checkbox" name="chkSon" value="<s:property value="SCvrgNo" />"
														onclick="ChkSonClick('chkSon','chkAll')" />
												</div>
											</td>
											<td height="20" bgcolor="#FFFFFF">
												<div align="center" class="STYLE1">
													<div align="center">
														<s:property value="#status.index+1" />
													</div>
												</div>
											</td>
											<td height="20" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1"> <s:property value="SCvrgNo" />
													</span>
												</div>
											</td>
											<td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
								
												<div align="center">
													<span class="STYLE1"> <s:property value="SCvrgNm" />
													</span>
												</div>
											</td>
											<td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
											  <div align="center">
											    <s:property value="product.SProductName"/>
										      </div>
										    </div></td>
											<td height="20" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE4"><img
															src="../tab/images/edt.gif" width="16" height="16" /><a
														href='reqEditDept?dept.SDeptNo=<s:property value="SDeptNo"/>'>编辑</a>&nbsp;
														&nbsp;<img src="../tab/images/del.gif" width="16"
															height="16" /><a
														href='delDept?dept.SDeptNo=<s:property value="SDeptNo"/>'>删除
													</a> </span>
												</div>
											</td>
										</tr>

									</s:iterator></form>

								</table>
					    </td>
							<td width="8" background="../tab/images/tab_15.gif">&nbsp;
								
							</td>
						</tr>
					</table>
				</td>
			</tr>
		
			<tr>
				<td height="35" background="../tab/images/tab_19.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="35">
								<img src="../tab/images/tab_18.gif" width="12" height="35" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td class="STYLE4">
											&nbsp;&nbsp;共有 ${page.totalCount} 条记录，当前第
											${page.currentPageNo}/${page.totalPageCount} 页
										</td>
										<td>
											<form id="myform"
												action="deptList?page.totalCount=${page.totalCount}&page.pageOpera=turnPage"
												method="post">
												<table border="0" align="right" cellpadding="0"
													cellspacing="0">
													<tr>
														<td width="40">
															<a
																href="deptList?page.pageSize=${page.pageSize}&page.totalCount=${page.totalCount}&page.currentPageNo=1&page.pageOpera=first"><img
																	src="../tab/images/first.gif" width="37" height="15" />
															</a>
														</td>
														<td width="45">
															<a
																href="deptList?page.pageSize=${page.pageSize}&page.totalCount=${page.totalCount}&page.currentPageNo=${page.currentPageNo}&page.pageOpera=back"><img
																	src="../tab/images/back.gif" width="43" height="15" />
															</a>
														</td>
														<td width="45">
															<a
																href="deptList?page.pageSize=${page.pageSize}&page.totalCount=${page.totalCount}&page.currentPageNo=${page.currentPageNo}&page.pageOpera=next"><img
																	src="../tab/images/next.gif" width="43" height="15" />
															</a>
														</td>
														<td width="40">
															<a
																href="deptList?page.pageSize=${page.pageSize}&page.totalCount=${page.totalCount}&page.currentPageNo=${page.totalPageCount}&page.pageOpera=last"><img
																	src="../tab/images/last.gif" width="37" height="15" />
															</a>
														</td>

														<td width="100">
															<div align="center">
																<span class="STYLE1">转到第 <input
																		name="page.currentPageNo" type="text" size="4"
																		style="height: 12px; width: 20px; border: 1px solid #999999;" />
																	页 </span>
															</div>
														</td>
														<td width="40">
															<img src="../tab/images/go.gif" width="37" height="15"
																onclick="javascript:submitForm()" />
														</td>
													</tr>
												</table>
											</form>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="../tab/images/tab_20.gif" width="16" height="35" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>
